from django.views.generic.list import ListView
from ittctalk.models import IttcTalk
from django.views.generic.edit import CreateView
from django.views.generic.detail import DetailView
from django.contrib.auth.decorators import login_required

class ListIttcTalkView(ListView):
    model = IttcTalk
    template_name = "ittctalk/list.html"
    queryset = IttcTalk.objects.all().order_by("-pk")[:10]

class CreateIttcTalkView(CreateView):
    model = IttcTalk
    template_name = "ittctalk/create.html"
    success_url = "/ittctalk/"
    
class DetailIttcTalkView(DetailView):
    model = IttcTalk
    template_name = "ittctalk/detail.html"
    
